﻿using Abp.Application.Services;
using Abp.AspNetCore.Mvc.Authorization;
using AbpZeroTemplate.Authorization;
using AbpZeroTemplate.MultiTenancy.HostDashboard;
using AbpZeroTemplate.MultiTenancy.HostDashboard.Dto;
using AbpZeroTemplate.Web.Controllers;
using AbpZeroTemplate.Web.Swagger;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

namespace AbpZeroTemplate.Api.Admin.Controllers
{
    /// <summary>HostDashboard
    /// </summary>
    [Area("Admin")]
    [Route("Admin/HostDashboard/[action]")]
    [ApiName("Admin")]
    [RemoteService]
    [AbpMvcAuthorize(AppPermissions.Pages_Administration_Host_Dashboard)]
    public class HostDashboardController : AbpZeroTemplateControllerBase
    {
        private readonly IHostDashboardAppService _hostDashboardAppService;
        public HostDashboardController(IHostDashboardAppService hostDashboardAppService)
        {
            _hostDashboardAppService = hostDashboardAppService;
        }

        [HttpGet]
        public async Task<HostDashboardData> GetDashboardStatisticsData(GetDashboardDataInput input)
        {
            return await _hostDashboardAppService.GetDashboardStatisticsData(input);
        }

        [HttpGet]
        public async Task<GetIncomeStatisticsDataOutput> GetIncomeStatistics(GetIncomeStatisticsDataInput input)
        {
            return await _hostDashboardAppService.GetIncomeStatistics(input);
        }

        [HttpGet]
        public async Task<GetEditionTenantStatisticsOutput> GetEditionTenantStatistics(GetEditionTenantStatisticsInput input)
        {
            return await _hostDashboardAppService.GetEditionTenantStatistics(input);
        }

    }
}
